package com.bluebench.bigul.utility;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class FileToStringConversion {

	
	
	public static String convertToString(String filePath) throws IOException{
		
		BufferedReader reader = new BufferedReader(new FileReader(new File(filePath)));
		StringBuilder builder = new StringBuilder();
		String line="";
		while((line = reader.readLine())!=null){
			//line = escapeDoubleQuotes(line);
			builder.append(line);
		}
		return builder.toString();
	}
	
	static String escapeDoubleQuotes(String line){
		return line.replace("\"", "\\\"").trim();
	}
	
	
	
}
